A view is a collection of text files, combined for easy viewing. The file contents are displayed in two levels, called chapters and sections in these notes. Every view has at least one chapter, each containing one or more sections. Views can be created, opened, and modified within Easy View. Simple printing of sections is supported.
Once a view is open, the left pane shows the chapters and the right pane shows the sections in the view. The current chapter and the current section are highlighted in the respective lists. The name of the open file is shown at the bottom of the window. More information about the open file will be displayed if the mouse is clicked on the file name.
This view, "Easy View - Read Me", combines two text files: "Easy View Introduction" and "Easy View Notes", as indicated on the upper-right pane.
----------
Format
The format of a view defines the chapters and sections contained in the files. It is, in general, indicated by separation lines that are made up of identical characters, like hyphens or asterisks. The formats that are currently recognized by Easy View are explained below:
**Plain:** This is in fact "no format at all". The whole file becomes a single section. The only chapter and section are both named after the file.
**Simple:** Sections are separated by hyphens and chapters by asterisks. The first line in each chapter or section is assumed to be its name. (This file is an example of simple format.)
**setext:** Sections are separated by hyphens and chapters by equal signs. Unlike the simple format, the names _precede_ the separation lines. Moreover, the apparent length of the name and its separator must be the same. This makes setext slightly more difficult to enter manually, but much more robust in comparison to Simple format. (Weekly TidBITS issues and the "Easy View Introduction" file are examples of setext format.)
**Digest:** This is basically for e-mail digests, like Info-Mac or Simulation Digest. The format is similar to #2 above. The chapters correspond to different digests, and the sections to the articles. The names for the chapters and the section are found in the digest itself, using a set of configuration strings. Similar digest formats are configurable.
**Mail:** Various collections from different e-mail systems are supported. The configurable string indicates the separation of mail items in the file. This format has the limitation of only one chapter per file, and the file name is used as the name of the corresponding chapter. Sample views include Internet mail, Rice Notebook, and CompuServe Navigator formats. Other formats can be configured easily.
**Dictionary:** The file contains a listing of words along with their explanations, in alphabetical order. Each line is a section, the name is the first word of the line. Chapters correspond to the letters of alphabet, combining all words starting with a given letter.
Caution: Files of different formats can be mixed in a single view, such as this one. However, it is strongly recommended that a single format is used throughout the view.
----------
New view
When the user selects "New…" from the File menu, a standard file dialog is presented, and the user makes an empty view, in a folder of his choice. Untitled views are never created, because the folder for each view must be known, within which the files will reside.
When the empty view appears, it is ready for modifications.
----------
Modifying a view
"Modify View…" command can be used on an open view. It presents the modification dialog with which files are added into or removed from the view. The first action should be making sure that the proper format appears in the pop-up menu.
The file list on the left-hand side shows all the text files in the current folder, not included in the view. They can be added one by one with the ">" button (or the Return key), or all at once with the ">>>" button. It is recommended that a single file is tried first, and then ">>>" is used after the format turns out to be correct.
The files that are selected will be analyzed one at a time. This process may be terminated by pressing the mouse key or <command><period> as usual. This results in the last added file being removed.
It is also possible to remove files from the view by the "<" or "<<<" buttons. The user may select a file on the right-hand side for removal. All the chapters in the selected file will be removed _from the view_, not from the disk. (This is not a "delete" command.)
The modification process marks the view "changed", a state which will be cleared by "Save" or "Revert" commands. If "Auto Save" option is checked, the view is immediately saved upon the exit from the dialog. In this case, Save and Revert operations will never be possible.
It should be emphasized that the text files are _never_ modified by this process.
----------
Auto Modify
One of the most useful user options, this makes the modification process mostly transparent to the user. Three types of auto-modification are supported:
**Auto-modify view**
The modification date of the text file will be checked and the view will be modified if necessary. This check will be done on _every_ read operation.
**Include all files in the folder**
The view file under consideration is assumed to be alone in a private folder, with all the text files it combines. Whenever a new file enters the folder, dragged by the user or saved by another application, it is automatically added to the view. The current format is used in the process.
**Remove files not found**
If a file is deleted or otherwise moved out of the folder, it is immediately removed from the view.
For the last two cases, the directory will only be checked when a view is activated in the front. The views at the back are never affected.
----------
Disk vs. memory
The view data contains only names and pointers to sections. Thus, it is stored always in the memory when a view is opened. The files, however, can be arbitrarily large. Only one file is open (read-only) at a given time and only one section is read into the memory. Because of TextEdit restrictions, the _displayed_ portion of a given section cannot exceed 32K bytes.
During the modification of the view, the whole file is read into the memory (if possible) for fast processing. This may impose a practical limit on the individual files. If failure occurs in "Modify…" command, try increasing the memory allocated to the application, or dividing the larger files into smaller parts.
Easy View will work within a Finder partition of 300K, but only very small files can be added in that case. (Unless System 7 can allocate the required amount of temporary memory)
The number of sections in a view is limited by 32K, practically unlimited for most needs. The number of chapters cannot exceed 1480.
The size of the view can be calculated as follows:
22 bytes per file
14 bytes per chapter
10 bytes per section
Add to this, the total length of all file, chapter, and section names, and about 500 bytes of overhead.
----------
Modified files
If some files in a view are modified outside the application, the appearance within Easy View will be damaged. In this version, there are two ways to correct the appearance: remove the file in the Modify dialog and add it again, or close the view and make a new view with the same name. In both cases, the preferences will be retained.
If some files in a view are moved, renamed, or deleted, Easy View has no way of locating them. The view itself can be renamed safely. The view can be moved, provided that all its files are also moved to the same folder. An open view should not be moved or renamed.
----------
TidBITS & Info-Mac
Two folders are included along with Easy View: one for TidBITS and one for Info-Mac archives. These folders can be freely put elsewhere on the disk. Once a file is downloaded, it should be put into the respective folder. The file will to be added _automatically_ into the view. These two types of files require no modification after downloading, the e-mail headers will be ignored.
Caution: if you are downloading files, make sure that you do not activate the view before the file transfer is complete. Otherwise, Easy View will work on incomplete files.
The views supplied with Easy View have the correct settings, that works best for the compact screens. You may use the Preferences dialog to change the settings.
**********
Browsing
Easy View opens the files in the view in a read-only state, with no intention of modifying them. Thus, the usual editing commands Cut, Paste, and Clear are not available. The only allowed editing operation is Copy command, which puts the selected text into the clipboard. The usual Copy operation and the text entry in the dialog boxes are undoable.
Two ways of clipping text are supported: The user may add any selected text or the current section into a text file. Alternatively, all the occurrences of a search string can be extracted by a single command. Both of these operations create new files by default, existing files may be used optionally. Clipping and extracting to text files are not undoable.
----------
Copy and Clip
A user may want to deal with complete sections, rather than selections. "Copy Section" command puts the current section into the clipboard without explicitly selecting the text. This is equivalent to "Select All", then "Copy", and then restore old selection.
As another convenience to the user, "Open Clip File…" command opens an output file for further clipping operations. When used, subsequent clip operations will write the selected text or the whole section into that file. All clipping goes to that file until the program termination or being closed by the user.
The default file selection routine makes a new text file. If the option or shift keys are pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Extract to…")
----------
Search
A simple "Find…" command and its derivatives are supported. The basic search engine is the Munger in ROM, which can handle only case-sensitive search.
Beginning with EV 2.3, three filters are used for configurable searching:
* E —> e : ignore case
* ê —> e : ignore accents
* É —> e : ignore both
More filters can be defined for other languages using Easy Convert, another freeware by the author.
As a non-standard feature, each view may have its own search string. This turns out to be rather useful in many cases, especially when different languages or scripts are in use.
Searching may be terminated by pressing <command><period> or the mouse key as usual.
----------
Extract
All the occurrences of the current search string will be written to a text file. The default behavior is to extract the line of occurrence along with the chapter name. Optionally, the whole section may be extracted. With setext and digest formats, the resulting file will also have the correct section separators.
The default file selection routine makes a new text file. If the option or shift keys are pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Clip to…")
Extracting may be terminated by pressing <command><period> or the mouse key as usual.
----------
Movable Modal Dialogs
There are five dialogs in Easy View, all having the same "non-standard" behavior: Modify, Preferences, Configuration, Find, and Style dialogs.
These dialogs behave like the Movable Modal Dialogs of System 7. The same behavior will be observed even in the earlier systems.
When one of these dialogs is active, switching to another application is possible. Edit menu will be active, only if there is an editable item. Escape key and <command><period> are equivalent to Cancel or Done buttons, all dismissing the dialog properly.
----------
Printing and Editing
Printing is supported only when styles are off. Only the current section will be printed. "Print One" allows standard printing without the dialog.
Easy View is an application strictly for browsing. Text files are opened read-only, with no intent to modify them. However, under System 7, an Apple event could be sent to the Finder to open the current file, from the menu or by pressing the "E" button at the lower left corner of the window. The effect is the same as opening the file in Finder.
----------
Windows
EV windows can be hidden using the last menu. The effect is similar to closing the window. View name for hidden windows will appear in the menu in italic type face. Such views are retained in memory, but not displayed.
Clipboard is always the first window.
"Stack Windows" command will arrange the visible windows, except the clipboard, in the order of opening. Only the position will be changed, not the window size.
**********
Navigation
Five ways of navigation are available:
* Mouse (this works as expected, so it needs no further explanation)
* "Go" menu
* Numeric keypad
* Keyboard
* Special keys
----------
"Go" menu
The text is displayed in three levels: chapters, sections, pages. Each of these levels has a vertical scroll bar. "Go" menu provides a quick way to go to the extremes of the scroll bars.
For those who prefer the keyboard shortcuts, almost all the items in this menu have numeric command key equivalents, making the keypad handy for navigation.
----------
Numeric keypad
The numeric keypad can be used for scrolling the two lists or the text itself. Without the command key, 7-8-9 row works as "Scroll forward" and 1-2-3 row as "Scroll back". The leftmost keys scroll chapters, the middle keys scroll sections, and the rightmost keys scroll pages.
With the command key, the same sets of keys have different functions, as explained in the "Go" menu: 7-8-9 row works as "First ..." and 1-2-3 row as "Last ...".
These keys never cross the boundaries of the chapters and sections.
0 (zero) key displays the previous position, quite useful after a Find command or when a wrong key is pressed by mistake.
----------
Keyboard
Since this is a browsing utility rather than an editor, the keyboard is available for entering commands. A few keys have special meanings:
Space Continue forward
b Continue backward
t Scroll to first page of current section (same as <command>9)
n Next section (same as down arrow)
p Previous section (same as up arrow)
These keys behave similar to the "rn" of unix. With the exception of "t", they may cross the chapter and section boundaries, if required. Thus, the Space key is very convenient for reading the file in a sequential fashion, using "b" or "n" once in a while.
With the command key, these keys either change their meaning completely or don't do anything. In that case, they become shortcuts for menu selection, as indicated on the respective menus.
----------
Special keys
PgUp and PgDn keys scroll page up and down in the current section. With the command key, they display first and last pages. (Equivalent to 9/3 keys)
Up and down arrows change the current section. These keys may cross the chapter boundaries, if required. With the command key, they display first and last sections, respectively. (Similar to 8/2 keys)
Left and right arrows change the current chapter. With the command key, they are reserved for Script Manager. (Similar to 7/1 keys)
Home and End keys display first and last pages, respectively. With the command key, they display first and last chapters.
----------
Bookmark
A single bookmark is maintained for each view. The last position is also saved after most navigation commands. These two positions are saved along with the preferences.
**********
Preferences
Easy View handles the user options in two categories: view preferences are saved with the view, default preferences are written into the System Preferences folder.
----------
View preferences
For each view, the information indicated below will be stored. This information will be written into the resource fork when the view is saved or closed, only if the user has modified the current values. This information will also be written when they are changed by the Preferences dialog.
* A set of options in the form of checkboxes (see the next section)
* File format (Pop-up menu)
* Signature for "Clip to…" and "Extract to…" files
(MSWD for MS Word, NISI for Nisus, etc)
* Vertical spacing in pixels (used only in styled text)
----------
Options in the Prefs Dialog
Below is an explanation of the action taken when a checkbox is _checked_.
**Auto-modify view:** check the modification date of the _text_file_ and modify the view if necessary. In order not to mix the two functions, this option is not in effect upon activation, until the text file is opened. (Again on purpose, this option does not activate auto-save)
**Include all files:** make sure that every text file in the folder is included in the view, by checking the folder modification date upon each activation. (This was named auto-modify in the previous versions)
**Remove files not found:** check the folder modification date upon each activation, and remove files not found in the folder.
**Save after modifications:** save the view after any modification, manual or automatic.
**Private search string:** keep the search string for this view private.
----------
Default preferences
Default preferences can be setup in the Preferences dialog in two ways: when no view window is open or when the Clipboard is the active window.
All the view preferences has default values.
----------
Configuration
This dialog was added for configuring digest and mail formats. (The dialog will appear if the option key was pressed when the Preferences menu is chosen) It is recommended that the beginners do not modify these strings.
**Digest Data:** Strings that mark the beginning and the end of a digest are included. Chapter name is a bit tricky: it indicates the column numbers in the form of chars. It should be entered with ResEdit or similar utility.
**Mail Data:** The only string here is the one that separates various mail items. The remainder of the line is used as subject or sender, if either is missing.
**Section Name:** This set of buttons indicate how the sections are to be named.
----------
Styles
For each view, the information indicated below will be stored. This information will be written into the resource fork when the view is saved or closed, only if the user has modified the current values. This information will also be written when they are changed by the Styles dialog.
* Appearance of the normal text: font and size
* Appearance of the lists: font, size, and justification
* setext styles: used for emphasis and quotations
The user should press a radio button to select a particular style. The Font and Style menus, as well as the Type Face radio buttons, can be used for changing that style.
When the Styles dialog is not shown, Font and Size menus apply only on the normal text.
**********
Version history
Easy View was designed in 1990 in order to read Inside Macintosh more efficiently. Other formats were included in 1992.
Here is a summary of the growth of the application, beginning with version 2.0.
----------
EV 2.0 July 92
* New file format that allows longer chapter and section names
* Preferences are saved in the resource fork
* Defaults are saved in the Preferences file
* Movable Modal Dialogs are implemented
* Names are compared using IUEqualString, rather than string comparison
* Better parsing for setext and digest formats
* "Remove" button is added to the Modify dialog
----------
EV 2.1 August 92
* Finder aliases correctly open the original files
* Add/Remove routines rewritten
* Auto Modify is implemented
* "Last Position" is added to navigation menu
* File info is improved
----------
EV 2.2 November 92
* Digest format is made configurable
* Mail format is implemented
* Simple printing is enabled
* Panes are resizeable by mouse command
* Font/Size menus are added for convenience
* "Set Bookmark" is added to navigation menu
* Clip and Copy operations are separated
* Custom SFGet and SFPut dialogs are used
----------
EV 2.3 April 93
* Apple event support: ability to open a text file with the correct application under System 7
* Filters generalize the concept of case-independent search: diacritical marks can be ignored, too
* "Search from top" option in Find dialog
* "Hide Top Window" command works very similar to the Hide command in the Application menu (Hidden window names are in italic)
* "Use Styles" menu toggles the use of styles. When something is copied while it is on, clipboard contents are also styled.
* Temporary memory is used for parsing under System 7, thus decreasing the minimum Finder partition
* When text is scrolled, an overlap with the previous window is retained
* "Print One" command is added for printing without a dialog
* "Display Selection" command makes navigation simplified
* The upper portion of a window is divided into two panes, rather than three. File Info is presented on the lower left corner (not optional)
* Menus are slightly rearranged
* Prefs dialog is greatly simplified. ~No more multiple modal dialogs~ "Auto modify", "Auto add", and "Auto remove" are separate options
* Keypad does not change selection, it only scrolls
* Dialog names and behavior are made consistent
* Clip commands are enabled even when no clip file is open
* Pane sizes are adjusted on zoomed windows, if necessary
* Mail format now displays the separator lines
* Empty Sender/Subject is properly handled
* Find window is not resized with changing font/size
* If a volume pointed by Finder aliases is off-line, it is recognized properly
**********
Future directions
Easy View is a program still under development.
**User comments are welcome.**
----------
Compatibility
Easy View will run under System 6.0 or later. The only reason why it will not work under earlier systems is its dependence on the Script Manager and styled TextEdit. It was tested with the Arabic system, and it should behave well with other scripts, too.
The performance is quite satisfactory even on a Mac Plus.
Easy View is compatible with System 7. It recognizes the Finder aliases and opens the original files.
----------
Easy View 2.x file format
The view file contains three arrays in the data fork:
FILE, CHAP, SECT
Each array contains this record:
numRows: integer;
fRecLen, fRes0: integer;
nSize: longint;
maxSize: longint;
maxRows: integer;
hName: handle;
hData: handle;
The first 10 bytes are stored in the file as a header.
(maxSize=nSize and maxRows=numRows, initially)
After the header, we have the contents of hData and hName,
in that order. (If a few bytes are missing at the end of
the file, the view is still readable)
The names are just added one after the other into hName^^.
Here is the interpretation of hData^^ array:
FileData = record
fName: longint;
fParser: integer;
fTime, fLength: longint;
fRes, fStatus: longint; {Reserved}
end;
ChapData = record
cName: longint;
cFile, cFirst, cNumber: integer;
cRes: longint; {Reserved}
end;
SectData = record
sName: longint;
sStart: longint;
sLength: integer;
end;
Each record starts with a long offset to the name handle.
In effect, this is a variable-size array with variable-size
strings.
The resource fork contains the preferences in 'spec' 128 (110 bytes)
fRect: Rect; {Window Rect}
sCurChap: integer;
sCurSect: integer;
fNumLines: integer; {Number of lines in the lists}
fChapPix: integer;
fSectPix: integer;
fFontT: FileStr; {32 bytes}
fSizeT: integer; {Display font size just}
fJustT: integer;
fFontL: FileStr;
fSizeL: integer; {List font size just}
fJustL: integer;
fOptions: set of SpecOption; {2 bytes}
fSignature: OSType;
fFormat: integer;
fBookMark: IndexPosition; {4 integers, EV 2.2}
fSpacing: integer; {EV 2.3}
fFilter: integer;
Beginning with version 2.2, 'spec' 129 contains the configuration strings for mail and digest formats. (130 bytes)
fNameKind: integer;
fDigStart: FileStr;
fDigChap: FileStr;
fDigEnd: FileStr;
fMailStart: FileStr;
Also as of EV 2.2, 'PRNT' 128 contains the data related to printing. (120 bytes)
Beginning with version 2.3, 'spec' 130 contains the style information. (96 bytes)
fStArray: array[0..7] of TextStyle;
----------
Not implemented yet
Manual sorting of files within a view is a missing feature that would be quite useful. The current file format makes the reordering within a view rather difficult. This is why the order cannot be maintained upon auto-modification of a view.